<template>
  <div class="container">
    <dv-border-box-11>
      <img :src="imageUrl" alt="Image" class="image" />

      <button @click="goBack" class="return-btn">返回</button>

    </dv-border-box-11>
  </div>
</template>

<script>
export default {
  props: ['imageUrl'],
  data() {
    return {
    };
  },
  methods: {
    goBack() {
      // 返回上一个页面
      this.$router.go(-1);
    }
  },
};
</script>

<style scoped>
.container {
  width: 100%;
  height: 105%;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 100%;
  height: auto;
  transform: translate(-50%, -50%);
  max-width: 95%;
  max-height: 95%;
  object-fit: fill;
}
.return-btn {
  position: fixed;
  top: 20px;
  right: 110px;
  width: 100px;
  height: 40px;
  font-size: 22px; /* 修改字号 */
  background-color: rgba(0, 184, 255, 0.18); /* 修改底色 */
  color: rgba(255, 255, 255, 0.97); /* 修改字体颜色 */

  border-radius: 4px; /* 圆角 */
}
</style>

